import os
import sys
import django

base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(base_dir)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tracer.settings")
django.setup()  # os.environ['DJANGO_SETTINGS_MODULE']
from web import models

# 往数据库添加数据：链接数据库、操作、关闭链接
models.PricePolicy.objects.create(category=1, title='个人免费版', price=0, project_num=3, project_members_num=2,
                            project_size='20M', file_size='5M')